<?php
class GoodsRelationModel extends RelationModel{
	Protected $tableName = 'goods';//定义主表

	Protected $_link = array(
		'goods_attr' => array(
			'mapping_type' => HAS_MANY,
			'foreign_key' => 'gid'
			),
		'intro' => array(
			'mapping_type' => HAS_ONE,
			'foreign_key' => 'gid'
			)
		);

}
?>